#pragma once
#include "DXUT.h"
struct ScreenVectexRHW
{
	ScreenVectexRHW()
	{

	}
	ScreenVectexRHW(const float &x,const float & y ,const float & u, const float & v,DWORD clr=D3DCOLOR_ARGB(255,255,255,255))
		:m_x(x), m_y(y), m_z(1.0f), m_rhw(1.0f),m_u(u), m_v(v),m_color(clr)

	{

	}
	float m_x, m_y, m_z, m_rhw;
	 DWORD m_color;
	float m_u, m_v;


};
class CMotionBlurTestNode:public ISceneNode
{
public:
	CMotionBlurTestNode(void);
	~CMotionBlurTestNode(void);

	virtual void OnUpdate( double fTime, float fElapsedTime );

	virtual void OnD3D9FrameRender( float fElapsedTime );

	virtual bool Unload();

	virtual bool Load();
private:
	IDirect3DPixelShader9 *m_pPixelShader;
	ID3DXConstantTable *m_pConstantTable;
  ScreenVectexRHW   m_Vertex[4];

    ScreenVectexRHW   m_Block[4];
    float x,y;
    D3DXVECTOR2 m_volicity;
	LPDIRECT3DTEXTURE9          g_pFullScreenRenderTarget;
	LPDIRECT3DSURFACE9          g_pFullScreenRenderTargetSurf;

	LPDIRECT3DTEXTURE9           m_pFullScreenLastFrameRenderTarget;
	LPDIRECT3DSURFACE9          m_pFullScreenLastFrameRenderTargetSurf;
};

